package org.bot.server.event.controller;

import com.alibaba.fastjson.JSONObject;
import org.bot.server.event.service.EventService;
import org.bot.server.utils.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 沧月
 * @create 0003 2023/10/3 18:31
 * @description <description class purpose>
 */

@RestController
@RequestMapping("/bot-event")
public class EventController extends BaseController {

    @Autowired
    EventService eventService;

    @RequestMapping("/getEventList")
    public JSONObject getEventList(String clientId) {
        return sendData(eventService.getEventList(clientId));
    }


    @RequestMapping("/eventConfig")
    public JSONObject eventConfig(String eventName) {
        return eventService.eventConfig(eventName);
    }
}
